﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Configuration;

using ServiceStack.OrmLite.SqlServer;
using Autofac;
using ServiceStack.OrmLite;
using sqlserver;
using ServiceStack;

namespace Aragorn.Orm.Test
{
    class Program
    {
        static void Main(string[] args)
        {

            new Program().Select1();

            Console.ReadKey();
        }

        public void Select1()
        {

            string con = System.Configuration.ConfigurationManager.ConnectionStrings["sqlserver"].ConnectionString;


            var dbFactory = new OrmLiteConnectionFactory(
                                con,
                                SqlServerDialect.Provider);


            using (var db =dbFactory.Open())
            {
               // db.Select<Category>().
                
                var s =  db.Where<Customer>(new {city= "London" });

                var r = db.From<Customer>().Select(q => q.City == "London");
            }

        }

        

    }
}
